package org.chr.cd.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.chr.cd.pojo.User;
import org.chr.cd.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/users")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/{id}")
    @Tag(name = "用户管理", description = "用户Id查询")
    public User getUserById(@PathVariable Integer id) {

        return userService.getUserById(id);
    }
}
